package com.block.job.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.block.db.entity.ProductPush;
import com.block.common.service.LogFactory;
import com.block.db.mapper.ProductPushMapper;
import com.block.job.service.ProductInfoJobService;
import org.slf4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author zhujx
 * @Date 2024-01-25
 **/
@Service
public class ProductInfoJobServiceImpl implements ProductInfoJobService {

    private static Logger log = LogFactory.getThridLog();

    @Resource
    ProductPushMapper productPushMapper;

    @Override
    public List<ProductPush> selectProductPushListByJob() {
        List<ProductPush> productPushes = productPushMapper.selectProductPushListByJob();
        log.info("当前在线的产品信息均价小于3的数据{}", JSONObject.toJSONString(productPushes));
        return productPushes;
    }
}
